﻿@model MvcCmsProjectTracker.ViewModels.BugIndexViewModel
@section HtmlHead{
}
<div id="activeprojectdisplay">
    @Html.Partial("ControlsProjectTracker/ActiveProject")
</div>
<br />
<table style="width: 100%">
    <tr>
        <th>
            Issue ID
        </th>
        <th style="width: 25%">
            Title
        </th>
        <th>
            Priority
        </th>
        <th>
        </th>
        <th>
            Status
        </th>
        <th>
        </th>
        <th>
            Creator
        </th>
        <th>
            Assigned
        </th>
        <th>
            Created
        </th>
        <th>
            Last Update
        </th>
    </tr>
    @foreach (var item in Model.Bugs)
    { 
        <tr>
            <td style="text-align: center">
                <a href="/projecttracker/Bug/SetIssueProject/@item.BugID">@item.BugID</a>
            </td>
            <td>
                <b>@item.Title </b>
            </td>
            <td>
                @if (item.ProjectPriority != null)
                {  
                    @item.ProjectPriority.Name
                }
            </td>
            <td>
                @if (item.ProjectPriority != null)
                {  
                    <img src="@Url.Content(item.ProjectPriority.ImageUrl) " alt="" />
                }
            </td>
            <td>
                @if (item.ProjectStatus != null)
                {  
                    @item.ProjectStatus.Name 
                }
            </td>
            <td>
                @if (item.ProjectStatus != null)
                {  
                    <img src="@Url.Content(item.ProjectStatus.ImageUrl) " alt="" />
                }
            </td>
            <td>
                @item.CreatorUserName
            </td>
            <td>
                @item.AssignedTo.UserName
            </td>
            <td>
                @String.Format("{0:g}", item.DateCreated)
            </td>
            <td>
                @String.Format("{0:g}", item.LastUpdate)
            </td>
        </tr>
    }
</table>
@section ScriptContent{
}
